/*
* 	Copyright (c) Altera Corporation 2002.
* 	All rights reserved.
*
*	Timer.h
*
*   Function prototypes and definitions to use the Timer routines
*/

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>

#ifndef TIMER_H
#define TIMER_H

#define TIMER00_TYPE (volatile unsigned int*)
#define HSN_1USEC (506)//temp zll
/*
*	Function prototypes
*/

/* Timer TYPE */
#define FREE_TIMER							0
#define NAV_TIMER 							1
#define CTS_TIMER 							2
#define ACK_TIMER							3
#define PIFS_TIMER							4
#define CW_TIMER							5
#define SIFS_TIMER							6


void init_timer1(void); //sbvr

void delay(unsigned);
void start_timer1();
void set_timer1_type(uint32_t type);
uint32_t get_timer1_type(void);
void reset_timer0(void);
void set_timer1_limit(uint32_t limit);
uint32_t check_timer1_expired(void);
uint32_t stop_timer1(void );
uint32_t current_timer1_value(void);

uint32_t get_timer1_interrupt();

#endif /* TIMER_H */
